package com.mingqijia.gassafety.webserver.request;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * @author zhangfei
 * @version 1.0.0
 * @ClassName SaveRunningStrategyRequest.java
 * @Description TODO
 * @createTime 2023年12月13日
 */
@Data
@ApiModel("新增运行策略")
public class SaveRunningStrategyRequest {

    //主键id
    @ApiModelProperty(value = "策略id")
    private Long id;

    //规则名称
    @ApiModelProperty(value = "规则名称")
    @NotBlank(message = "规则名称不能为空")
    @Length(min = 2, max = 32,message = "规则名称长度2-23字符")
    private String ruleName;

    //策略对象：0所有客户 1按照行业选择 2按照客户选择
    @NotNull(message = "策略对象不能为空")
    @ApiModelProperty(value = "策略对象：0所有客户 1按照行业选择 2按照客户选择")
    private Integer strategyObj;

    @NotNull(message = "规则类型不能为空")
    @ApiModelProperty(value = "规则类型：0设备故障 1设备离线 2设备运行报告 3服务到期提醒")
    private Integer strategyType;
    //行业或者客户数据：;号隔开
    @ApiModelProperty(value = "客户id/行业编码")
    private String strategyObjValues;

    @NotBlank(message = "推送方式不能为空")
    @ApiModelProperty(value = "推送方式用;拼接：1 短信推送 2 微信模版消息 3机器人外呼")
    private String adviceType;

    private Integer strategyEquipment=0;

    //备注说明
    @ApiModelProperty(value = "备注说明")
    private String remark;

    //  ext策略数据
    @Valid
    @ApiModelProperty(value = "策略数据详情")
    @NotNull(message = "策略详细规则不能为空")
    @Size(min = 1,message = "至少包含一个内容")
    private List<RunningStrategyExtRequest> extData;



    @ApiModelProperty(value = "保存并启用，0保存并启用 ，1仅保存")
    private int saveAndEnable=0;

    private int source;

    private String enterpriseName;

    private String spId;

    @ApiModelProperty(value = "短信推送模板CODE，可以为空，为空取默认")
    private String smsMsgCode;

    @ApiModelProperty(value = "微信推送模板CODE，可以为空，为空取默认")
    private String wxMsgCode;



}